﻿using System.Collections.Generic;

namespace XUCore.WeChat.Enterprise
{
    /// <summary>
    /// 企业微信配置信息
    /// </summary>
    public class EnterpriseWeChatOption
    {
        /// <summary>
        /// 企业ID，获取方式参考：术语说明-corpid <see href="https://developer.work.weixin.qq.com/document/path/90665#corpid"/>
        /// </summary>
        public string CorpId { get; set; }
        /// <summary>
        /// 企业简称
        /// </summary>
        public string CorpName { get; set; }
        /// <summary>
        /// 第三方应用id或者代开发应用模板id。第三方应用以ww或wx开头应用id（对应于旧的以tj开头的套件id）；代开发应用以dk开头
        /// </summary>
        public string SuiteId { get; set; }

        /// <summary>
        /// 第三方应用secret 或者代开发应用模板secret
        /// </summary>
        public string SuiteSecret { get; set; }

        /// <summary>
        /// Gets or sets the Token
        /// </summary>
        public string Token { get; set; }

        /// <summary>
        /// Gets or sets the EncodingAESKey
        /// </summary>
        public string EncodingAESKey { get; set; }

        /// <summary>
        /// 授权应用集合
        /// </summary>
        public List<EnterpriseWeChatAgent> Agents { get; set; }
    }

    public class EnterpriseWeChatAgent
    {
        /// <summary>
        /// 企业ID，获取方式参考：术语说明-corpid <see href="https://developer.work.weixin.qq.com/document/path/90665#corpid"/>
        /// </summary>
        public string CorpId { get; set; }

        /// <summary>
        /// 企业简称
        /// </summary>
        public string CorpName { get; set; }

        /// <summary>
        /// 企业微信的应用id （e.g. 1000247）
        /// </summary>
        public int AgentId { get; set; }

        /// <summary>
        ///应用的凭证密钥，注意应用需要是启用状态，获取方式参考：术语说明-secret <see href="https://developer.work.weixin.qq.com/document/path/90665#secret"/>
        /// </summary>
        public string AgentSecret { get; set; }

        /// <summary>
        /// Gets or sets the Token
        /// </summary>
        public string Token { get; set; }

        /// <summary>
        /// Gets or sets the EncodingAESKey
        /// </summary>
        public string EncodingAESKey { get; set; }
    }
}
